﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Coldairarrow.Business.Goods;
using Coldairarrow.Entity.Goods;
using Microsoft.AspNetCore.Mvc;

namespace Coldairarrow.Api.Controllers.WeChat
{
    [Route("/WeChat/[controller]/[action]")]
    public class WeChat_BannerController : BaseApiController
    {
        #region DI

        public WeChat_BannerController(IBTB_BannerBusiness bTB_BannerBus)
        {
            _bTB_BannerBus = bTB_BannerBus;
        }

        IBTB_BannerBusiness _bTB_BannerBus { get; }

        #endregion
        /// <summary>
        /// 查询首页所有的轮播图
        /// </summary>
        /// <returns></returns>
        [NoCheckJWT]
        [HttpPost]
        public async Task<List<BTB_Banner>> GetHomeData()
        {
            return await _bTB_BannerBus.GetData(1);
        }
        /// <summary>
        /// 查询特惠所有的轮播图
        /// </summary>
        /// <returns></returns>
        [NoCheckJWT]
        [HttpPost]
        public async Task<List<BTB_Banner>> GePreferentialtData()
        {
            return await _bTB_BannerBus.GetData(2);
        }
    }
}